<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="jxt.elt.common.Fun"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.net.URLDecoder"%>
<%@ include file="../common/yylogcheck.jsp" %>
<%@page import="jxt.elt.common.DbPool"%>
<%request.setCharacterEncoding("UTF-8");%>


<%
Fun fun=new Fun();
Connection conn=DbPool.getInstance().getConnection();
Statement stmt=conn.createStatement();
ResultSet rs=null;


String ydh=request.getParameter("ydh");
if (!fun.sqlStrCheck(ydh))
{	
	return;
}
String strsql="select d.ydh,d.fhr,d.fhrdh,d.gys,tgys.gysmc from tbl_ygddmx d left join tbl_spgys tgys on d.gys=tgys.nid where d.ydh="+ydh+" group by d.ydh";
%>
<%
try
{
	rs=stmt.executeQuery(strsql);
	if(rs.next()){
		out.print(rs.getString("ydh")+",");
		out.print(rs.getString("fhr")+",");
		out.print(rs.getString("fhrdh")+",");
		out.print(rs.getString("gys")+",");
		out.print(rs.getString("gysmc"));
	}else{
		out.print("0");	
	}
	rs.close();
}
catch(Exception e)
{			
	e.printStackTrace();
}
finally
{
	if (!conn.isClosed())
		conn.close();
}
%>
